﻿using Basic.FormModel.DB;
using Basic.FormModel.PageLayout;
using Basic.FormRemoteModel.PageLayout.Model;

namespace Basic.FormCollect
{
    public interface ICustomPageLayoutCollect
    {
        void SaveSort ( Dictionary<long, int> sort );
        long Add ( PageLayoutAddDto data );
        void Delete ( DBCustomPageLayout sour );
        DBCustomPageLayout Get ( long id );

        Result Get<Result> ( long id ) where Result : class, new();
        Result[] Gets<Result> ( long pageId ) where Result : class, new();
        bool Set ( DBCustomPageLayout layout, PageLayoutSet set );
        PageLayoutDatum[] GetChildren ( long pageId, long parentId );
        bool Move ( DBCustomPageLayout layout, long parentId );
        void Clear ( long[] ids );
        long[] GetChildrenId ( long pageId, long id );

        Result[] GetFormItem<Result> ( long pageId ) where Result : class, new();
    }
}